home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / calnz.dxr / 00010_Script_audio_object < prev    next >
Text File  |  1998-10-25  |  1KB  |  70 lines

  1. property myType,mychannel,myCastnumber,myDir,myFilename,mytitle,Objs
  2.  
  3. on birth me,myDirP,myFileP
  4.   global ll
  5.   set mytype = #audio
  6.   set myDir = myDirP
  7.   set myFilename = MyFileP
  8.   set myChannel = 1
  9.   set myCastNumber= getAudioCast(gvars)
  10.   set the filename of member myCastnumber = myDir&myFilename
  11.   set the name of member mycastnumber = myfilename
  12.   set mytitle = myFilename
  13.   return me
  14. end birth
  15.  
  16. on playAudio me,FadeInTime
  17.   if soundBusy(myChannel) then
  18.     puppetsound mychannel,0
  19.   end if
  20.   
  21.   if voidP(FadeInTime)=false then
  22.     sound fadein myChannel,FadeInTime
  23.   end if
  24.   puppetsound myFilename
  25. end playAudio
  26.  
  27. --best not to use fadeout option
  28. on stopAudio me,FadeOutTime
  29.   if voidP(FadeOutTime)=false then
  30.     sound fadeout myChannel,fadeOutTime
  31.   else
  32.     puppetsound myChannel,0
  33.     updatestage
  34.   end if
  35.   
  36. end stopAudio
  37.  
  38. on kill me
  39.   global gvars
  40.   puppetsound mychannel,0
  41.   returnAudioCast(gvars,myCastNumber)
  42.  
  43. end
  44.  
  45. on redrawObject me
  46.   nothing
  47. end
  48.  
  49. on moveObjectOffscreen me
  50.   nothing
  51. end
  52.  
  53. --Needs switchon and switch OFF and looking over with regard to does
  54. --it have all required functions for redrawing etc
  55. on enable me
  56.   nothing
  57. end
  58.  
  59. on disable me
  60.   nothing
  61. end
  62.  
  63. on switchOffObj me
  64.   puppetsound mychannel,0
  65. end
  66.  
  67. on switchOnObj me
  68.   nothing
  69. end
  70.